#include <iostream>
using namespace std;
class Animal
{
public:
	void eat()
	{
		cout<<"动物吃"<<endl;
	}
	void sleep()
	{
		cout<<"动物睡觉"<<endl;
	}
private:
	int age;
};

class Dog:public Animal
{
public:
	//重写父类的同名eat方法和sleep方法
	void eat()
	{
		cout<<"狗吃肉"<<endl;
	}
	void eat(string something)
	{
		cout<<"狗吃  "<<something<<endl;
	}
	void sleep()
	{
		cout<<"狗趴着睡觉"<<endl;
	}
};

int main()
{
	//定义一个Dog对象
	Dog dog;
	dog.eat();
	dog.Animal::eat();  //我想调用父类的eat()方法
}